/**
 * Description:
 * Class Name:LinkedHashSetTest
 * Date:2022/2/26 16:04
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第8章_Java集合._8_3_Set集合._8_3_2_LinkedHashSet类;

import java.util.LinkedHashSet;

public class LinkedHashSetTest {
    public static void main(String[] args) {
        var books = new LinkedHashSet();
        books.add("book1");
        books.add("book2");
        books.add("book3");
        System.out.println(books);

        // 删除book1
        books.remove("book1");
        // 重新添加book1
        books.add("book1");
        System.out.println(books);
    }
}
